<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('plugin_counter_record', function (Blueprint $table) {
            $table->id();
            $table->foreignId('plugin_counter_id')->constrained('plugin_counter')->cascadeOnDelete()->comment('插件计数器ID');
            $table->integer('amount')->comment('数量');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('plugin_counter_record');
    }
};
